package com.synergy.stockflow.procure.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.synergy.stockflow.warehouse.entity.Warehouse;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

@Schema
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "vendor")
public class Vendor {
    /**
     * 供应商编码
     */
    @TableId(value = "vendor_id", type = IdType.ASSIGN_ID)
    @Schema(description="供应商编码")
    private String vendorId;

    /**
     * 供应商名称
     */
    @TableField(value = "Vendor_name")
    @Schema(description="供应商名称")
    private String vendorName;

    /**
     * 供应商分类（新供应商、深度合作）
     */
    @TableField(value = "vendor_classify")
    @Schema(description="供应商分类（新供应商、深度合作）")
    private String vendorClassify;

    /**
     * 供应商等级（一级、二级、三级）
     */
    @TableField(value = "vendor_grade")
    @Schema(description="供应商等级（一级、二级、三级）")
    private String vendorGrade;

    /**
     * 开始签约时间
     */
    @TableField(value = "vendor_agency")
    @Schema(description="开始签约时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date vendorAgency;

    /**
     * 结束签约时间
     */
    @TableField(value = "vendor_agencyend")
    @Schema(description="结束签约时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date vendorAgencyend;

    /**
     * 结算期限（月结，季结，现结）
     */
    @TableField(value = "vendor_settlementperiod")
    @Schema(description="结算期限（月结，季结，现结）")
    private String vendorSettlementperiod;

    /**
     * 信用额度/元
     */
    @TableField(value = "vendor_creditlimit")
    @Schema(description="信用额度/元")
    private Double vendorCreditlimit;

    /**
     * 采购负责人（联系供应商员工）
     */
    @TableField(value = "vendor_headofpurchasing")
    @Schema(description="采购负责人（联系供应商员工）")
    private String vendorHeadofpurchasing;

    /**
     * 供应商地址
     */
    @TableField(value = "vendor_address")
    @Schema(description="供应商地址")
    private String vendorAddress;

    /**
     * 详细地址
     */
    @TableField(value = "vendor_fulladdress")
    @Schema(description="详细地址")
    private String vendorFulladdress;

    /**
     * 供应商联系人姓名
     */
    @TableField(value = "vendor_contactname")
    @Schema(description="供应商联系人姓名")
    private String vendorContactname;

    /**
     * 供应商联系电话
     */
    @TableField(value = "vendor_contactphone")
    @Schema(description="供应商联系电话")
    private String vendorContactphone;

    @TableField(exist = false)
    @Schema(description="员工姓名")
    private String nickname;
}